#ifndef APP_TEMPLATE_H
#define APP_TEMPLATE_H
#include <string.h>
#include "log/log_err.h"

/* 判断两个内存是否相同 */
template <typename T>
bool IsTheSame(T *a, T *b) {
    bool ret = true;
    uint8_t *dataA = (uint8_t *)a;
    uint8_t *dataB = (uint8_t *)b;

    for (int i = 0; i < sizeof(T); i++) {
        if (*(dataA + i) != *(dataB + i)) {
            SIGNWAY_LOGI("%d %d %d", i, dataA[i], dataB[i]);
            ret = false;
            break;
        }
    }

    return ret;
}

#endif